package com.time.client.common.enums;

import lombok.Getter;

/**
 * @Description
 * @Author HuangQi
 * @Date 2025/10/31
 */

/**
 * 激活状态枚举
 *
 * @author: HuangQi
 * @date: Created in 23:38 2025/10/31
 * @description: 激活状态枚举
 */
@Getter
public enum IsActiveStatusEnum {

    ACTIVE(0, "活跃"),
    UN_ACTIVE(1, "不活跃");

    public int code;

    public String desc;

    IsActiveStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static IsActiveStatusEnum getByCode(int codeVal) {
        for (IsActiveStatusEnum isActiveStatusEnum : IsActiveStatusEnum.values()) {
            if (isActiveStatusEnum.code == codeVal) {
                return isActiveStatusEnum;
            }
        }
        return null;
    }

}
